package com.zc.controller;

import com.zc.common.BaseResult;
import com.zc.feignservice.PaymentFeignService;
import com.zc.model.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description:
 * @author: cong
 * @create: 2024/10/12
 */
@RestController
@RequestMapping("/feign")
@Slf4j
public class OrderFeignController {
    @Autowired
    private PaymentFeignService paymentFeignService;

    @GetMapping("/order/{id}")
    public BaseResult<Payment>getOrderPayment(@PathVariable("id") long id) {
        return paymentFeignService.getPaymentById(id);
    }
}
